import time
a=open('/home/student/Рабочий стол/Вяземская 8Б/m1_sorted.txt')
b=a.readlines
b= list(map(int,a))
st=time.time()
for i in range (len(b)-1):
    for j in range (i+1, len(b)):
        if b[i]>b[j]:
            b[i], b[j]=d[j], b[i]
fin=time.time()
print(round(fin-st)*1000)

r=open('/home/student/Рабочий стол/Вяземская 8Б/m2_reverse.txt')
t=a.readlines
t= list(map(int,a))
st=time.time()
for i in range (len(t)-1):
    for j in range (i+1, len(t)):
        if t[i]>t[j]:
            t[i], t[j]=t[j], t[i]
fin=time.time()
print(round(fin-st)*1000)

w=open('/home/student/Рабочий стол/Вяземская 8Б/m2_reverse.txt')
q=a.readlines
q= list(map(int,a))
st=time.time()
for i in range (len(q)-1):
    for j in range (i+1, len(q)):
        if q[i]>q[j]:
            q[i], q[j]=t[j], q[i]
fin=time.time()
print(round(fin-st)*1000)




